package com.jd.myaaaccount.util;

import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.content.Context;

public class AlertDialogHelper {
	/**
	 * 显示提示框
	 * 
	 * @param context
	 * @param messag
	 * @return
	 */
	public static AlertDialog showOKAlertDialog(Context context, String message) {
		return new AlertDialog.Builder(context).setTitle("提示")
				.setMessage(message).setPositiveButton("确定", null).show();
	}

	/**
	 * 显示确定 取消询问框
	 * 
	 * @param context
	 * @param messag
	 * @return
	 */
	public static AlertDialog showOKCancelAlertDialog(Context context,
			String message) {
		return new AlertDialog.Builder(context).setTitle("询问")
				.setMessage(message).setPositiveButton("确定", null)
				.setPositiveButton("取消", null).show();
	}

	/**
	 * 显示 是否 提示框
	 * 
	 * @param context
	 * @param messag
	 * @return
	 */
	public static AlertDialog showYesOrNoAlertDialog(Context context,
			String message) {
		return new AlertDialog.Builder(context).setTitle("询问")
				.setMessage(message).setPositiveButton("是", null)
				.setPositiveButton("否", null).show();
	}

	/**
	 * 显示等待框
	 * 
	 * @param context
	 * @param messag
	 * @return
	 */
	public static ProgressDialog showWaitProgressDialog(Context context,
			String message) {
		ProgressDialog pd = new ProgressDialog(context);
		pd.setProgressStyle(ProgressDialog.STYLE_SPINNER);
		pd.setMessage(message);
		pd.setIndeterminate(false);
		pd.setCancelable(false);
		pd.show();
		return pd;
	}
}
